package com.deke.course.controller;

import com.deke.course.service.CoreShoucangTeacherService;
import com.deke.course.vo.TbShoucangTeacherVo;
import com.deke.entity.EduTeacher;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ：陈昂（731712841@qq.com）
 * @date ：Created in 2023/1/5 15:52
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/core/shoucangTeacher")
@Api(tags = "个人中心,我的关注接口类")
public class CoreShoucangTeacherController {
    @Autowired
    private CoreShoucangTeacherService coreShoucangTeacherService;

    @PostMapping("/findAttentionTeacherById/{HuiYuanId}")
    @ApiOperation(value = "根据id查询关注得讲师")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "HuiYuanId", value = "会员id")
    })
    public List<EduTeacher> findAttentionTeacherById(@PathVariable String HuiYuanId) {
        return coreShoucangTeacherService.findAttentionTeacherById(HuiYuanId);
    }

    @PostMapping("/deleteAttentionTeacher")
    @ApiOperation(value = "根据id删除关注得讲师")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "TbShoucangTeacherVo", value = "会员id和教师id")
    })
    public int deleteAttentionTeacher(@RequestBody TbShoucangTeacherVo tbShoucangTeacherVo) {
        return coreShoucangTeacherService.deleteAttentionTeacher(tbShoucangTeacherVo);
    }
}